<?php
class AdminmenuWidget extends CWidget
{
	var $data = NULL;
	
	public function init()
	{
		// this method is called by CController::beginWidget()
		$this->data = array();
	}
	
	public function run()
	{
		// this method is called by CController::endWidget()
		
		$adminmenu_array = adminmenu::model()->findAll(array(
			"condition"=>"enable = 1",
			"order" => "`order`"
		));
		
		$this->data["adminmenu_array"] = $adminmenu_array;
		$this->render("adminmenu", $this->data);
		
	}
}